package com.atguitu.cm.bean;

/**
 * Customer的实体类, 用于封装客户信息
 * 
 * @author Unicorn
 */
public class Customer {
	// 设置属性的私有访问权限
	private String name; // 姓名
	private char gender; // 性别
	private int age; // 年龄
	private String phone; // 电话
	private String email; // 邮箱

	// 通过公有的get,get实现对属性的访问
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public char getGender() {
		return gender;
	}

	public void setGender(char gender) {
		this.gender = gender;
	}

	public int getAge() {
		return age;
	}

	public void setAge(int age) {
		this.age = age;
	}

	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	// 构造器
	public Customer() {

	}

	public Customer(String name, char gender, int age, String phone, String email) {
		this.name = name;
		this.gender = gender;
		this.age = age;
		this.phone = phone;
		this.email = email;
	}

	@Override
	public String toString() {
		return "Customer [name=" + name + ", gender=" + gender + ", age=" + age + ", phone=" + phone + ", email="
				+ email + "]";
	}

	public static void main(String[] args) { // 进行单元测试
		Customer cus = new Customer("李白", '男', 28, "010-123456", "sxt@126.com");
		System.out.println(cus);
	}

}
